﻿Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls

Partial Class Home
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        Dim us As New Users

        Try
            us.UserName = Me.txtUserName.Text.ToString


            If (Users.LoadUserByUserName()) Then
                AppDataContext.User = us

                Me.lblOut.Text = "Username: " & AppDataContext.User.UserName & " UserID: " & AppDataContext.User.UserID & " Account Locked: " & AppDataContext.User.AccountLocked.ToString & " Password: " & AppDataContext.User.Password
            Else
                Me.lblOut.Text = "User Not Found"
            End If



        Catch ex As Exception
            Me.lblOut.Text = ex.Message
        End Try


    End Sub
End Class
